//declare sub Form_Paint(g as graphics)
sub Form_Paint(g as graphics)
	dim c as color

	me.title = "Joe"
	c = new color
	c.rgb(255, 100, 0)

	g.forecolor = c
	g.fillRect(200, 10, 20, 20)
	
end subSub Main()	dim w as window
	//we cannot touch the window until it is created
	createWindow(w,9)

	w.title = "Hello Window"
	w.width = 400
	w.height = 400
	w.left = 100

	//msgbox("width=" & w.width)

	dim b as button
	dim t1 as textbox, t2 as textarea
	dim pg as progressbar, ck as checkbox

	w.CreateControl(b, 218, 48, 80, 20)
	w.CreateControl(t1, 15, 48, 130, 22)
	w.CreateControl(t2, 15, 82, 220, 70)
	w.CreateControl(pg, 15, 15, 100, 12)
	w.CreateControl(ck, 148, 15, 80, 20)

	t1.text = "Hello jose"
	pg.maximum = 300
	pg.value = 200

	SetEventHandler(w, "paint", Form_Paint)end sub